/*
YUI 3.15.0 (build 834026e)
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/

YUI.add("cache-base",function(e,t){var n=e.Lang,r=e.Lang.isDate,i=function(){i.superclass.constructor.apply(this,arguments)};e.mix(i,{NAME:"cache",ATTRS:{max:{value:0,setter:"_setMax"},size:{readOnly:!0,getter:"_getSize"},uniqueKeys:{value:!1},expires:{value:0,validator:function(t){return e.Lang.isDate(t)||e.Lang.isNumber(t)&&t>=0}},entries:{readOnly:!0,getter:"_getEntries"}}}),e.extend(i,e.Base,{_entries:null,initializer:function(e){this.publish("add",{defaultFn:this._defAddFn}),this.publish("flush",{defaultFn:this._defFlushFn}),this._entries=[]},destructor:function(){this._entries=[]},_setMax:function(e){var t=this._entries;if(e>0){if(t)while(t.length>e)t.shift()}else e=0,this._entries=[];return e},_getSize:function(){return this._entries.length},_getEntries:function(){return this._entries},_defAddFn:function(e){var t=this._entries,r=e.entry,i=this.get("max"),s;this.get("uniqueKeys")&&(s=this._position(e.entry.request),n.isValue(s)&&t.splice(s,1));while(i&&t.length>=i)t.shift();t[t.length]=r},_defFlushFn:function(e){var t=this._entries,r=e.details[0],i;r&&n.isValue(r.request)?(i=this._position(r.request),n.isValue(i)&&t.splice(i,1)):this._entries=[]},_isMatch:function(e,t){return!t.expires||new Date<t.expires?e===t.request:!1},_position:function(e){var t=this._entries,n=t.length,r=n-1;if(this.get("max")===null||this.get("max")>0)for(;r>=0;r--)if(this._isMatch(e,t[r]))return r;return null},add:function(e,t){var i=this.get("expires");this.get("initialized")&&(this.get("max")===null||this.get("max")>0)&&(n.isValue(e)||n.isNull(e)||n.isUndefined(e))&&this.fire("add",{entry:{request:e,response:t,cached:new Date,expires:r(i)?i:i?new Date((new Date).getTime()+this.get("expires")):null}})},flush:function(e){this.fire("flush",{request:n.isValue(e)?e:null})},retrieve:function(e){var t=this._entries,r=t.length,i=null,s;if(r>0&&(this.get("max")===null||this.get("max")>0)){this.fire("request",{request:e}),s=this._position(e);if(n.isValue(s))return i=t[s],this.fire("retrieve",{entry:i}),s<r-1&&(t.splice(s,1),t[t.length]=i),i}return null}}),e.Cache=i},"3.15.0",{requires:["base"]});
/*
YUI 3.15.0 (build 834026e)
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/

YUI.add("cache-offline",function(e,t){function n(){n.superclass.constructor.apply(this,arguments)}var r=null,i=e.JSON;try{r=e.config.win.localStorage}catch(s){}e.mix(n,{NAME:"cacheOffline",ATTRS:{sandbox:{value:"default",writeOnce:"initOnly"},expires:{value:864e5},max:{value:null,readOnly:!0},uniqueKeys:{value:!0,readOnly:!0,setter:function(){return!0}}},flushAll:function(){var e=r,t;if(e)if(e.clear)e.clear();else for(t in e)e.hasOwnProperty(t)&&(e.removeItem(t),delete e[t])}}),e.extend(n,e.Cache,r?{_setMax:function(e){return null},_getSize:function(){var e=0,t=0,n=r.length;for(;t<n;++t)r.key(t).indexOf(this.get("sandbox"))===0&&e++;return e},_getEntries:function(){var e=[],t=0,n=r.length,s=this.get("sandbox");for(;t<n;++t)r.key(t).indexOf(s)===0&&(e[t]=i.parse(r.key(t).substring(s.length)));return e},_defAddFn:function(e){var t=e.entry,n=t.request,s=t.cached,o=t.expires;t.cached=s.getTime(),t.expires=o?o.getTime():o;try{r.setItem(this.get("sandbox")+i.stringify({request:n}),i.stringify(t))}catch(u){this.fire("error",{error:u})}},_defFlushFn:function(e){var t,n=r.length-1;for(;n>-1;--n)t=r.key(n),t.indexOf(this.get("sandbox"))===0&&r.removeItem(t)},retrieve:function(e){this.fire("request",{request:e});var t,n,s;try{s=this.get("sandbox")+i.stringify({request:e});try{t=i.parse(r.getItem(s))}catch(o){}}catch(u){}if(t){t.cached=new Date(t.cached),n=t.expires,n=n?new Date(n):null,t.expires=n;if(this._isMatch(e,t))return this.fire("retrieve",{entry:t}),t}return null}}:{_setMax:function(e){return null}}),e.CacheOffline=n},"3.15.0",{requires:["cache-base","json"]});
/*
YUI 3.15.0 (build 834026e)
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/

YUI.add("cache-plugin",function(e,t){function n(t){var n=t&&t.cache?t.cache:e.Cache,r=e.Base.create("dataSourceCache",n,[e.Plugin.Base]),i=new r(t);return r.NS="tmpClass",i}e.mix(n,{NS:"cache",NAME:"cachePlugin"}),e.namespace("Plugin").Cache=n},"3.15.0",{requires:["plugin","cache-base"]});
YUI.add("yg-helper-rteswitch",function(a){a.namespace("helper.rteswitch");BLOCK_ELEMENTS={address:1,blockquote:1,body:1,caption:1,center:1,col:1,colgroup:1,dd:1,dir:1,div:1,dl:1,dt:1,fieldset:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,li:1,menu:1,ol:1,p:1,pre:1,table:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1,ul:1};a.helper.rteswitch=new function(){function b(o,p){var q=o.cloneNode(true),n=a.Node.getDOMNode(q),m=c(n);if(p){m=g(m,true)}return m}function l(m){m=m.replace(/<br>/gi,"\n");m=m.replace(/<p>/gi,"");m=m.replace(/<\/p>/gi,"\n");m=m.replace(/&nbsp;/gi," ");m=m.replace(/<div(.)*?>/gi,"");m=m.replace(/<\/div>/gi,"\n");return m}function i(o,q){var m=a.Node.create("<div>"+o+"</div>"),p=a.Node.getDOMNode(m),n=c(p);if(q){n=g(n)}return n}function c(o){var m=a.UA.ie,n;if(!m){h(o)}else{n=o.innerHTML.replace(/(((<div\s+[^>]*>)|(<div\s*>))&nbsp;<\/div>)/gi,"<BR/>");o.innerHTML=n}return j(o,false,"").replace(/\n[\s\xA0]+$/,"")}function j(o,s,t){if(o.nodeType===1||o.nodeType===11){switch(o.tagName){case"SCRIPT":case"STYLE":case"LINK":case"OBJECT":case"EMBED":return"";case"HR":var v=o.previousSibling;return(e(v)?"":"\n")+"________________________________\n";case"BR":return"\n"+t;case"BLOCKQUOTE":t+=">";default:var q=[];var m=o.firstChild;var r=0;while(m!==null){var u=j(m,m.tagName==="PRE",t);if(m.nodeType===1){if(f(m)==="block"&&q.length>0&&m.tagName!=="TD"){var p=u.match(/^[ \t\r\n\v\f]*$/);if(!p||m.tagName==="LI"){q.push("\n"+t)}}switch(m.tagName){case"LI":r++;q.push("\t"+(m.parentNode.tagName==="OL"?r+".":"*")+" ");break}}if(u){q.push(u)}if(m.nodeType===1){switch(m.tagName){case"TD":q.push(" ");break}}m=m.nextSibling}return q.join("")}}else{if(o.nodeType===3){var q=o.nodeValue;q=q.replace(/\r|\r?\n/g,"\n"+t);if(!s){q=q.replace(/\n[ \t\r\n\v\f]+/g," ");var v=o.previousSibling;var n=v?f(v):null;if(v===null||e(v)){q=q.replace(/^[ \t\r\n\v\f]+/,"")}else{if(n==="block"){q=q.replace(/^[ \t\r\n\v\f]+/,"\n")}else{if(n==="inline"){q=q.replace(/^[ \t\r\n\v\f]+/," ")}}}q=q.replace(/[ \t\r\n\v\f]+$/," ")}return q}else{return""}}}function e(m){if(m===null||m.nodeType!==1){return false}return m.tagName==="BR"}function f(m){if(m===null||m.nodeType!==1){return null}if(m.style.display){if(m.style.display==="block"){return"block"}else{if(m.style.display==="inline"){return"inline"}}}return BLOCK_ELEMENTS[m.tagName.toLowerCase()]?"block":"inline"}function h(p){if(p.nodeType===1||p.nodeType===11){var n=p.firstChild;while(n!==null){var r=n.nextSibling;h(n);n=r}}else{if(p.nodeType===3){var o=p.nodeValue;if(o.match(/^[ \t\r\n\v\f]*$/)){var m=p.previousSibling;var q=m?f(m):"inline";if(q==="inline"&&!e(m)){p.nodeValue=p.nodeValue.replace(/\n.*/," ")}else{p.parentNode.removeChild(p)}}}}}function d(m){if(m==null){return null}m=""+m;m=m.replace(/&/g,"&amp;");m=m.replace(/</g,"&lt;");m=m.replace(/>/g,"&gt;");m=m.replace(/\"/g,"&quot;");m=m.replace(/\'/g,"&#39;");m=m.replace(/\\/g,"&#92;");m=m.replace(/{/g,"&#123;");m=m.replace(/&(?:amp;)+/g,"&amp;");return m}function g(n,m){n=d(n);n=k(n);if(m){n=n.replace(/\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;");n=n.replace(/( ){2}/g,"&nbsp;&nbsp;")}n=n.replace(/\n/ig,"<br />");return n}function k(n){n=n.replace(/(https?:\/\/[^\s<]+)/ig,'<a target="_blank" href="">$1</a>');n=n.replace(/([^\/])(www\.(\w+\.)+[^\s<]+)/ig,'$1<a target="_blank" href="http://">$2</a>');n=n.replace(/^(www\.(\w+\.)+[^\s<]+)/ig,'<a target="_blank" href="http://">$1</a>');n=n.replace(/((&lt;|&gt;|[^A-Za-z0-9#_\/]){1,10})<\/a>/g,"</a>$1");var m;try{m=new RegExp("'>([^<]+?)</oa>","g")}catch(o){m=new RegExp("'>([^<]+)","g")}n=n.replace(m,"$1'>$1</a>");return n}a.mix(this,{convertToPlain:b,convertHTMLToPlain:i,clearHtml:l})}},"1.0.0",{requires:[]});YUI.add("yg-plugin-error-node",function(c,b){c.namespace("Groups.Plugin.ErrorMsgNode");var a=c.Base.create(b,c.Plugin.Base,[],{initializer:function(d){this._node=d.host;this._timer=0},addAndShow:function(d){this.add(d);this.show()},add:function(d){this.get("errors").push(d)},show:function(){if(this._timer){window.clearTimeout(this._timer)}var g=this.get("errors"),d=this,e,f;if(g.length>0){if(g.length==1){e=this.get("fadeOutInterval");if(e>0){f=this._hide}}else{e=this.get("msgInterval");f=this.show}this._node.setHTML(g.shift());this._show();if(f){this._timer=window.setTimeout(function(){f.call(d)},e)}}},_show:function(){this._node.removeClass("hide");this._node.show(true)},_hide:function(){this._timer=0;this._node.hide(true)}},{NS:"errMsg",ATTRS:{msgInterval:{value:500},fadeOutInterval:{value:10000},errors:{value:[]}}});c.Groups.Plugin.ErrorMsgNode=a},"0.1",{requires:["node","base","plugin"]});